<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="">
	<meta http-equiv="description" content="This is my page">

	<link rel="stylesheet" type="text/css" href="${CONTEXT_PATH}/common/arrange/css/fullcalendar.css">
	<link rel="stylesheet" type="text/css" href="${CONTEXT_PATH}/common/arrange/css/fullcalendar.print.css media='print'">
	<link rel="stylesheet" type="text/css" href="${CONTEXT_PATH}/common/arrange/css/theme.css">
	<script type="text/javascript" src="${CONTEXT_PATH}/common/arrange/js/fullcalendar.js"></script>
	
	<style type='text/css'>
	body {
		margin-top: 40px;
		text-align: center;
		font-size: 13px;
		font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
		}

	#calendar {
		width: 700px;
		margin: 0 auto;
		}

	</style>
  </head>
  
  <body>
    <center>
    	<s:form name="frm" id="frm" method="post" action="" namespace="">
    		<div id='calendar'></div>
    	</s:form>
    </center>
    
    <script type='text/javascript'>

	$(document).ready(function() {
	
		var date = new Date();
		var d = date.getDate();
		var m = date.getMonth();
		var y = date.getFullYear();
		
		$('#calendar').fullCalendar({
			theme: true,
			header: {
				left: 'prevYear prev next nextYear today',
				center: 'title',
				right: ''
			},
			events: function(start, end, callback) {
				ajaxAction('test/queryUser.action', 'get', 'frm', true, function(result){
					var events = [];
					var list = result.list;
					var len = list.length;
					for(var i = 0; i < len; i++)
					{
						events.push({title:list[i].username, start:list[i].registerTime});
					}
					callback(events);
				});
			}
		});
		
	});

</script>
  </body>
</html>
